package io.github.zerobyteword.springfasterstartup.metrics;

public class BeanInitTime {
    private String beanName;
    private long start;
    private long end;


    public BeanInitTime(String beanName) {
        this.beanName = beanName;
        this.start = System.currentTimeMillis();
    }

    public void end() {
        this.end = System.currentTimeMillis();
    }

    public long cost() {
        return this.end - this.start;
    }

    public String getBeanName() {
        return beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public long getStart() {
        return start;
    }

    public void setStart(long start) {
        this.start = start;
    }

    public long getEnd() {
        return end;
    }

    public void setEnd(long end) {
        this.end = end;
    }
}
